import pymysql

conn = pymysql.connect(user='root', password='root', database='advanced', charset='utf8')
cursor = conn.cursor()
message= input('请输入标题:')
sql= 'delete from new_table where headline = %s'
sul = cursor.execute(sql, [message])
print('受影响行数%d' % sul)
conn.commit()
cursor.close()
conn.close()